import 'dart:ui';

import 'package:flutter_graphics_view/src/context/scene_state_context.dart';

class SceneStateWriter {
  final SceneStateContext _sceneStateContext;

  SceneStateWriter(this._sceneStateContext);

  updateScene() {
    _sceneStateContext.update();
  }

  setPosition(Offset position) {
    _sceneStateContext.setPosition(position);
  }

  setScale(double scale) {
    assert(scale > 0);
    _sceneStateContext.setScale(scale);
  }

  updatePosition(Offset offset) {
    _sceneStateContext.updatePosition(offset);
  }

  updateScale(double scale) {
    _sceneStateContext.updateScale(scale);
  }

  resetScene() {
    _sceneStateContext.reset();
  }

  setSceneColor(Color color) {
    _sceneStateContext.color = color;
  }

  setMaxScale(double scale) {
    _sceneStateContext.maxScale = scale;
  }

  setMinScale(double scale) {
    _sceneStateContext.minScale = scale;
  }
}
